package com.kevin.designpattern.observer;

public class Client {

    public static void main(String[] args) {
        // 创建公众号对象
        SubscriptionSubject subscriptionSubject = new SubscriptionSubject();

        // 订阅公众号
        subscriptionSubject.attach(new WeiXinUser("齐天大圣"));
        subscriptionSubject.attach(new WeiXinUser("猪无能"));
        subscriptionSubject.attach(new WeiXinUser("沙悟净"));

        // 公众号更新
        subscriptionSubject.notify("暑假的西游记开始播放了");
    }
}
